package org.example;

import java.util.Calendar;
import java.util.Date;
import java.util.Scanner;

public class Main {


    public static void main(String[] args) {
//        int year = 2023;
//        int month = 1;
//        int day = 4;
//        Calendar calendar = Calendar.getInstance();
//        calendar.set(year, month, day);
//        System.out.println(calendar.get(Calendar.DAY_OF_WEEK));

        int year = 2023;
        int month = 1;
        int day = 4;
        Calendar calendar = Calendar.getInstance();
        calendar.set(year, month, day);
        System.out.println(calendar.get(Calendar.DAY_OF_WEEK));

    }

    /**
     * Calendar对象到Date对象的转换
     *
     * @param date date类型
     * @return Calender类型
     */
    public static Calendar change(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        return calendar;
    }
}